﻿using System;
using System.Windows.Forms;
using Ninject;
using ReAnimation.Helpers.IoC;
using ReAnimation.Modules;
using ReAnimation.MVP.ViewInterfaces;


namespace ReAnimation
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);


            IKernel kernel = new StandardKernel(new ModelsModule(),
                                                new ViewsModule(),
                                                new GlModule(),
                                                new HelpersModule(),
                                                new PersistenceModule(),
                                                new SelectionHandlersModule(),
                                                new VisualizationModule(),
                                                new PolicyModule(),
                                                new ServicesModule(),
                                                new DomainObjectsFactoriesModule()
                                               );

            /*var model = kernel.Get<IMainModel>();
            var atomDescriptionRepository = kernel.Get<IAtomDescriptionRepository>();

            model.CurrentMolecule.Atoms.Add(new AtomDescription { Position = new Vector3F(0, 0, 0), AtomDescription =  atomDescriptionRepository.GetByName("H")});
            model.CurrentMolecule.Atoms.Add(new AtomDescription { Position = new Vector3F(0, 0.15f, 0), AtomDescription = atomDescriptionRepository.GetByName("C (sp)") });
            model.CurrentMolecule.Atoms.Add(new AtomDescription { Position = new Vector3F(0.15f, 0, 0), AtomDescription = atomDescriptionRepository.GetByName("C (sp)") });
            model.CurrentMolecule.Atoms.Add(new AtomDescription { Position = new Vector3F(0, 0, 0.15f), AtomDescription = atomDescriptionRepository.GetByName("H") });
            */
            Application.Run((Form)kernel.Get<IMainView>());   
        }
             
    }
}

